<%-------------------------------------------------------------------
 * 页面名称：addOperator_content.jsp
 * 功能描述：添加操作员
 * Action  : 
 *
 *-------------------------------------------------------------------
--%>

<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ipb" uri="/WEB-INF/conf/tld/ipb.tld"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%
String path = request.getContextPath();
%>
<script language="javascript" src="<%=path%>/js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/PassGuardCtrl.js"></script>
<script type='text/javascript' src='<%=path%>/js/register.js'></script>

<link href="<%=path%>/css/common.css" rel="stylesheet" type="text/css" />
<script language="javascript">
	function submitProcess() {
		var formName = document.forms["0"];
		
		if(emptyValidate(getObj("operatorCode"),"操作员用户名") != ""){
			getObj("operatorCode").focus();
			return false;
		}
		
		if(emptyValidate(getObj("operatorName"),"操作员姓名") != ""){
			getObj("operatorName").focus();
			return false;
		}
		
		if(!mobileValidate(formName.mobile)){
			getObj("mobile").focus();
			return false;
		}
		
		if(pgeditor.pwdLength()==0){
		     alert("登录密码不能为空！");
			 _$("_ocx_password").focus();
			 return false;
		}
		
		if(pgeditor.pwdValid()==1){
			alert("登录密码在8到20位！");
			 _$("_ocx_password").focus();
			 return false;
		}
		
		if(pgeditor.pwdStrength()<3){
		     alert("登录密码至少是数字字母符号的两种组合！");
			 _$("_ocx_password").focus();
			 return false;
		}
		
		if(pgeditor1.pwdHash()!=pgeditor.pwdHash()){
		     alert("重复登录密码跟登录密码输入不一致！");
			 _$("_ocx_password1").focus();
			 return false;
		}	
		
		if(pgeditor2.pwdLength()==0){
		     alert("支付密码不能为空！");
			 _$("_ocx_password2").focus();
			 return false;
		}
		
		if(pgeditor2.pwdValid()==1){
			alert("支付密码在8到20位！");
			 _$("_ocx_password2").focus();
			 return false;
		}
		
		if(pgeditor2.pwdStrength()<3){
		     alert("支付密码至少是数字字母符号的两种组合！");
			 _$("_ocx_password2").focus();
			 return false;
		}
		
		if(pgeditor3.pwdHash()!=pgeditor2.pwdHash()){
		     alert("确认支付密码跟支付密码输入不一致！");
			 _$("_ocx_password3").focus();
			 return false;
		}	
		
		FormSubmit5();
			
		var PwdResult=pgeditor.pwdResult();
		getObj('loginPass').value=PwdResult;
		
		var PwdResult2=pgeditor2.pwdResult();
		getObj('payPass').value=PwdResult2;
		
		formName.submit();
	}
	
	window.onload = function(){	 
	   pgeditor.pgInitialize();//初始化控件
	   pgeditor1.pgInitialize();//初始化控件
	   pgeditor2.pgInitialize();
	   pgeditor3.pgInitialize();
	   window.setInterval("GetLevel2()",800);
	   window.setInterval("GetLevel3()",800);
	}
</script>
<div id="main">
	<html:form action="addOperator.do">
		<div class="content_right">
			<div style="width:745px;margin-left:10px;">
				<div class="titleinfo">
					添加操作员
				</div>
				<div class="edit_pass">
					<table width="100%" border="0" align="center" cellpadding="5"
						cellspacing="1">
						<tr>
							<td align="right">
								<span class="orang12b">*</span> 操作员用户名：
							</td>
							<td colspan="2" class="font_blue">
								<input type="text" id="operatorCode" name="operatorCode" alt="操作员用户名"
									maxlength="30" class="ocx_style2" />
							</td>
						</tr>
						<tr>
							<td align="right">
								<span class="orang12b">*</span> 姓名：
							</td>
							<td colspan="2" class="font_blue">
								<input type="text" id="operatorName" name="operatorName" alt="姓名" maxlength="255"
									class="ocx_style2" />
							</td>
						</tr>
						<tr>
							<td align="right">
								手机：
							</td>
							<td colspan="2" class="font_blue">
								<input type="text" name="mobile" maxlength="30"
									class="ocx_style2" />
							</td>
						</tr>
						<tr>
							<td align="right">
								岗位：
							</td>
							<td colspan="2" class="font_blue">
								<input type="text" name="operatorPosition" maxlength="255"
									class="ocx_style2" />
							</td>
						</tr>
						<tr>
							<td align="right">
								<span class="orang12b">*</span> 登录密码：
							</td>
							<td width="39%" class="font_blue">
							   <script type="text/javascript">pgeditor.generate()</script>
								<input id="loginPass" name="loginPass" type="hidden" />
								<span class="font_gray"> (6-20位) </span>
							</td>
							<td width="39%" bgcolor="#FFFFFF">
								<table border="0" cellpadding="0" cellspacing="1" bgcolor="#D0D0D0" >
									<tr>
										<td width="48" height="6" align="center" background="<%=path%>/images/bg.gif" id="passwd_level_1"></td>
										<td width="48" height="6" align="center" background="<%=path%>/images/bg.gif" id="passwd_level_2"></td>
										<td width="48" height="6" align="center" background="<%=path%>/images/bg.gif" id="passwd_level_3"></td>
									</tr>
								</table>	
								<table border="0" cellpadding="0" cellspacing="1" >	
									<tr>
									  <td width="48" height="18" align="center" class="STYLE3">弱</td>
									  <td width="48" height="18" align="center" class="STYLE3">中</td>
									  <td width="48" height="18" align="center" class="STYLE3">强</td>
									  </tr>
								</table>
							</td>
						</tr>
						<tr>
							<td align="right">
								<span class="orang12b">*</span> 重复登录密码：
							</td>
							<td class="font_blue">
								<script type="text/javascript">pgeditor1.generate()</script>
								<input id="loginPass2" name="loginPass2" type="hidden" />
								<span class="font_gray"> (6-20位) </span>
							</td>
							<td width="39%" bgcolor="#FFFFFF">
							</td>
						</tr>
						<tr>
							<td align="right">
								<span class="orang12b">*</span> 支付密码：
							</td>
							<td class="font_blue">
								<script type="text/javascript">pgeditor2.generate()</script>
								<input id="payPass" name="payPass" type="hidden" />
								<span class="font_gray"> (6-20位) </span>
							</td>
							<td width="39%" bgcolor="#FFFFFF">
								<table border="0" cellpadding="0" cellspacing="1" bgcolor="#D0D0D0" >
									<tr>
										<td width="48" height="6" align="center" background="<%=path%>/images/bg.gif" id="passwd_level_4"></td>
										<td width="48" height="6" align="center" background="<%=path%>/images/bg.gif" id="passwd_level_5"></td>
										<td width="48" height="6" align="center" background="<%=path%>/images/bg.gif" id="passwd_level_6"></td>
									</tr>
								</table>	
								<table border="0" cellpadding="0" cellspacing="1" >	
									<tr>
									  <td width="48" height="18" align="center" class="STYLE3">弱</td>
									  <td width="48" height="18" align="center" class="STYLE3">中</td>
									  <td width="48" height="18" align="center" class="STYLE3">强</td>
									  </tr>
								</table>
							</td>
						</tr>
						<tr>
							<td align="right">
								<span class="orang12b">*</span> 重复支付密码：
							</td>
							<td class="font_blue">
								<script type="text/javascript">pgeditor3.generate()</script>
								<input id="payPass2" name="payPass2" type="hidden" />
								<span class="font_gray"> (6-20位) </span>
							</td>
							<td width="39%" bgcolor="#FFFFFF">
							</td>
						</tr>

						<tr>
							<td width="22%" align="right">
								是否设置为审核员：
							</td>
							<td colspan="2" class="font_blue">
								<input type="radio" name="auditFlag" value="Y" style="border:0" />
								是&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="radio" name="auditFlag" value="N" checked="checked"
									style="border:0" />
								否
							</td>
						</tr>
						<tr>
							<td align="right" valign="top">
								备注：
							</td>
							<td colspan="2" class="font_blue">
								<textarea name="operatorRemark" title="maxlength:255;title:备注"
									cols="35" rows="5" class="ocx_style2"></textarea>
								<br />
								<span class="font_gray">(最长85个字符) </span>
							</td>
						</tr>

						<tr>
							<td height="55" align="right">
								&nbsp;
							</td>
							<td colspan="2" class="font_blue">
								<input name="button32" type="button" class="button_style"
									onclick="submitProcess();" value="确 定" />
								<input name="button3" type="button" class="button_style"
									onclick="location.href='operator.do';" value="返 回" />
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</html:form>
</div>
